package brush;

import shape.Circle;
import shape.Square;
import surface.Canvas;

public class BrushFactory {

	public static BrushStateContext squareBrush(Canvas canvas, int x, int y, int size) {
		return new BrushStateContext(new SquareBrush(canvas, new Square(x, y, size)));
	}
	
	public static BrushStateContext circleBrush(Canvas canvas, int x, int y, int radius) {
		return new BrushStateContext(new CircleBrush(canvas, new Circle(x, y, radius)));
	}
	
	public static BrushStateContext getBrush(String brush, Canvas canvas, int x, int y, int size) {
		switch(brush) {
		case "square":
			return squareBrush(canvas, x, y, size);
		case "circle":
			return circleBrush(canvas, x, y, size);
		}
		return squareBrush(canvas, x, y, size);
	}
}
